/*
 * Air Roommates Accounts
 *Copyright 2009 - Julien EVANO & Enguerran GILLET
 *
 *This program is free software: you can redistribute it and/or modify
 *it under the terms of the GNU General Public License as published by
 *the Free Software Foundation, either version 3 of the License, or
 *(at your option) any later version.
 *
 *This program is distributed in the hope that it will be useful,
 *but WITHOUT ANY WARRANTY; without even the implied warranty of
 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *GNU General Public License for more details.
 *
 *You should have received a copy of the GNU General Public License
 *along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *Distributed under the terms of the GNU GPL v3.
 *http://www.gnu.org/licenses/gpl-3.0.html
 */
air.trace('ARA.viewport.center.EntriesGrid');
Ext.namespace('ARA.viewport.center');
ARA.viewport.center.EntriesGrid = function(config){
	
	/* pre-processing */
	air.trace('EntriesGrid - pre-processing');
	Ext.apply(this,config);
	
	/* constructor */
	air.trace('EntriesGrid - constructor');
	ARA.viewport.center.EntriesGrid.superclass.constructor.call(this, {
		id:'entries-grid',
		title:'Entries',
        region:'center',
		margins:'3 3 3 0',
		sm: new Ext.grid.RowSelectionModel({moveEditorOnEnter: false}),
        columns: [
			ARA.data.columns.entry.Date,
			ARA.data.columns.entry.Profil,
			ARA.data.columns.entry.Group,
			ARA.data.columns.entry.Type,
			ARA.data.columns.entry.Description,
			ARA.data.columns.entry.Category,
			ARA.data.columns.entry.UnderCategory,
			ARA.data.columns.entry.Amount,
			ARA.data.columns.entry.Currency
        ],
        store: new ARA.data.store.table.EntryStore()
	});
	
	/* post-processing */
	air.trace('EntriesGrid - post-processing');
};
Ext.extend(ARA.viewport.center.EntriesGrid,Ext.grid.GridPanel);